From 732891efc28ade8b0f273c3b2cdb4262af54c277 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 5 Sep 2017 12:06:46 -0400 Subject: [PATCH] lib/repo: Add error prefixing during hardlink object import I happened to have a repo with a missing commit object, and got an unprefixed error during a pull-local. Closes: #1129 Approved by: jlebon --- src/libostree/ostree-repo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 430f6631..70672ae0 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -3350,6 +3350,9 @@ import_one_object_link (OstreeRepo *self, GCancellable *cancellable, GError **error) { + const char *errprefix = glnx_strjoina ("Importing ", checksum, ".", + ostree_object_type_to_string (objtype)); + GLNX_AUTO_PREFIX_ERROR (errprefix, error); char loose_path_buf[_OSTREE_LOOSE_PATH_MAX]; _ostree_loose_path (loose_path_buf, checksum, objtype, self->mode); @@ -3396,7 +3399,7 @@ import_one_object_link (OstreeRepo *self, return TRUE; } else - return glnx_throw_errno (error); + return glnx_throw_errno_prefix (error, "linkat"); } if (objtype == OSTREE_OBJECT_TYPE_COMMIT) -- 2.30.2